<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增家族成员')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-family-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">姓名：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">性别：</label>
                <div class="col-sm-8">
                    <select name="sex" class="form-control m-b">
                        <option value="1">男</option>
                        <option value="0">女</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">年龄：</label>
                <div class="col-sm-8">
                    <input name="age" class="form-control" type="number" maxlength="3">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">关系：</label>
                <div class="col-sm-8">
                    <select name="relation" class="form-control m-b">
                        <option value="SELF">自己</option>
                        <option value="FATHER">父亲</option>
                        <option value="MOTHER">母亲</option>
                        <option value="BROTHER">兄弟</option>
                        <option value="SISTER">姐妹</option>
                        <option value="SON">儿子</option>
                        <option value="DAUGHTER">女儿</option>
                        <option value="GRANDMA">(外)祖母</option>
                        <option value="GRANDPA">(外)祖父</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">身高（CM）：</label>
                <div class="col-sm-8">
                    <input name="height" class="form-control" type="number" maxlength="3">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">体重（KG）：</label>
                <div class="col-sm-8">
                    <input name="weight" class="form-control" type="number" maxlength="3">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/family"
        $("#form-family-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-family-add').serialize());
            }
        }
    </script>
</body>
</html>